Rename libostree to ostree
authorFelix Krull <f_krull@gmx.de>
Thu, 16 May 2019 19:41:38 +0000 (21:41 +0200)
committerColin Walters <walters@verbum.org>
Fri, 6 May 2022 16:53:53 +0000 (12:53 -0400)
rust-bindings/rust/.gitlab-ci.yml
rust-bindings/rust/Cargo.toml
rust-bindings/rust/LICENSE
rust-bindings/rust/Makefile
rust-bindings/rust/conf/libostree.toml [deleted file]
rust-bindings/rust/conf/ostree.toml [new file with mode: 0644]
rust-bindings/rust/tests/roundtrip.rs

index 7bcb70444b03827d9a4ad9ee2192b29f32e5c186..8ee85051ea5f4f2678d90f4361634a78e86a1b75 100644 (file)
@@ -31,20 +31,20 @@ publish_ostree-sys:
   - cargo publish --verbose --manifest-path sys/Cargo.toml --token $CRATES_IO_TOKEN
   when: manual
 
-# libostree
-libostree:
+# ostree
+ostree:
   stage: build
   script:
   - cargo test --verbose  --all-features
 
-libostree_nightly:
+ostree_nightly:
   stage: build
   image: rustlang/rust:nightly
   script:
   - cargo test --verbose  --all-features
   allow_failure: true
 
-publish_libostree:
+publish_ostree:
   stage: publish
   script:
   - cargo publish --verbose --token $CRATES_IO_TOKEN
index 99ad529c821cc57f8e393f8879236863870a5515..bb293dbbdd94a74d79150cf0120500447f6c793f 100644 (file)
@@ -1,5 +1,5 @@
 [package]
-name = "libostree"
+name = "ostree"
 version = "0.2.0"
 authors = ["Felix Krull"]
 
@@ -7,7 +7,7 @@ license = "MIT"
 description = "Rust bindings for libostree"
 keywords = ["ostree", "libostree"]
 
-documentation = "https://fkrull.gitlab.io/ostree-rs/libostree"
+documentation = "https://fkrull.gitlab.io/ostree-rs/ostree"
 repository = "https://gitlab.com/fkrull/ostree-rs"
 readme = "README.md"
 
@@ -25,7 +25,7 @@ features = ["dox"]
 repository = "fkrull/ostree-rs"
 
 [lib]
-name = "libostree"
+name = "ostree"
 
 [dependencies]
 libc = "0.2"
index b2b123aa2009643b0741097afdb967960592ac0a..95f6e9df14c1db6d37b8059d3a1d754e0cbdf179 100644 (file)
@@ -1,6 +1,6 @@
 MIT License
 
-Copyright (c) 2018 Felix Krull
+Copyright (c) 2018, 2019 Felix Krull
 
 Permission is hereby granted, free of charge, to any person obtaining a copy
 of this software and associated documentation files (the "Software"), to deal
index e0858033968ba7e16e0c5fe87e722d566bdb49bf..04fbe7fb746991932c5a13bc7488859fa29f2794 100644 (file)
@@ -1,4 +1,4 @@
-all: gir/libostree gir/ostree-sys
+all: gir/ostree gir/ostree-sys
 
 .PHONY: update-gir-files
 
@@ -16,7 +16,7 @@ target/tools/bin/rustdoc-stripper:
        cargo install --root target/tools -- rustdoc-stripper
 
 merge-lgpl-docs: target/tools/bin/gir target/tools/bin/rustdoc-stripper
-       target/tools/bin/gir -c conf/libostree.toml -m doc
+       target/tools/bin/gir -c conf/ostree.toml -m doc
        target/tools/bin/rustdoc-stripper -g -o target/vendor.md
 
 
diff --git a/rust-bindings/rust/conf/libostree.toml b/rust-bindings/rust/conf/libostree.toml
deleted file mode 100644 (file)
index c45012e..0000000
+++ /dev/null
@@ -1,105 +0,0 @@
-[options]
-work_mode = "normal"
-library = "OSTree"
-version = "1.0"
-target_path = ".."
-doc_target_path = "../target/vendor.md"
-deprecate_by_min_version = true
-
-girs_dir = "../gir-files"
-
-generate = [
-    "OSTree.AsyncProgress",
-    "OSTree.GpgSignatureFormatFlags",
-    "OSTree.GpgVerifyResult",
-    "OSTree.ObjectType",
-    "OSTree.Remote",
-    "OSTree.RepoCheckoutMode",
-    "OSTree.RepoCheckoutOverwriteMode",
-    "OSTree.RepoCommitModifier",
-    "OSTree.RepoCommitState",
-    "OSTree.RepoDevInoCache",
-    "OSTree.RepoMode",
-    "OSTree.RepoPruneFlags",
-    "OSTree.RepoPullFlags",
-    "OSTree.RepoRemoteChange",
-    "OSTree.RepoResolveRevExtFlags",
-    "OSTree.RepoTransactionStats",
-    "OSTree.SePolicy",
-    "OSTree.SePolicyRestoreconFlags",
-    "OSTree.StaticDeltaGenerateOpt",
-    "OSTree.RepoListRefsExtFlags",
-
-    #"OSTree.RepoPruneOptions",
-    #"OSTree.RepoExportArchiveOptions",
-    #"OSTree.RepoCheckoutOptions",
-    #"OSTree.RepoCheckoutAtOptions",
-]
-
-manual = [
-    "Gio.Cancellable",
-    "Gio.File",
-    "Gio.FileInfo",
-    "Gio.FileQueryInfoFlags",
-    "Gio.InputStream",
-    "GLib.Bytes",
-    "GLib.Error",
-    "GLib.KeyFile",
-    "GLib.String",
-    "GLib.Variant",
-]
-
-[[object]]
-name = "OSTree.CollectionRef"
-status = "generate"
-    [[object.function]]
-    pattern = "dupv|equal|freev|hash"
-    ignore = true
-
-[[object]]
-name = "OSTree.MutableTree"
-status = "generate"
-    [[object.function]]
-    pattern = "lookup"
-    ignore = true
-
-[[object]]
-name = "OSTree.Repo"
-status = "generate"
-    [[object.function]]
-    pattern = ".+_async"
-    ignore = true
-
-    [[object.function]]
-    pattern = "mode_from_string"
-    ignore = true
-
-    [[object.function]]
-    pattern = "remote_gpg_import"
-    ignore = true
-
-[[object]]
-name = "OSTree.RepoFile"
-status = "generate"
-    [[object.function]]
-    pattern = "get_xattrs"
-    ignore = true
-
-    [[object.function]]
-    pattern = "tree_find_child"
-    ignore = true
-
-    [[object.function]]
-    pattern = "tree_query_child"
-    ignore = true
-
-[[object]]
-name = "OSTree.*"
-status = "generate"
-    [[object.function]]
-    pattern = "cmp_checksum_bytes|checksum_inplace_to_bytes"
-    ignore = true
-
-    [[object.constant]]
-    pattern = "VERSION|VERSION_S|YEAR_VERSION|RELEASE_VERSION"
-    ignore = true
diff --git a/rust-bindings/rust/conf/ostree.toml b/rust-bindings/rust/conf/ostree.toml
new file mode 100644 (file)
index 0000000..c45012e
--- /dev/null
@@ -0,0 +1,105 @@
+[options]
+work_mode = "normal"
+library = "OSTree"
+version = "1.0"
+target_path = ".."
+doc_target_path = "../target/vendor.md"
+deprecate_by_min_version = true
+
+girs_dir = "../gir-files"
+
+generate = [
+    "OSTree.AsyncProgress",
+    "OSTree.GpgSignatureFormatFlags",
+    "OSTree.GpgVerifyResult",
+    "OSTree.ObjectType",
+    "OSTree.Remote",
+    "OSTree.RepoCheckoutMode",
+    "OSTree.RepoCheckoutOverwriteMode",
+    "OSTree.RepoCommitModifier",
+    "OSTree.RepoCommitState",
+    "OSTree.RepoDevInoCache",
+    "OSTree.RepoMode",
+    "OSTree.RepoPruneFlags",
+    "OSTree.RepoPullFlags",
+    "OSTree.RepoRemoteChange",
+    "OSTree.RepoResolveRevExtFlags",
+    "OSTree.RepoTransactionStats",
+    "OSTree.SePolicy",
+    "OSTree.SePolicyRestoreconFlags",
+    "OSTree.StaticDeltaGenerateOpt",
+    "OSTree.RepoListRefsExtFlags",
+
+    #"OSTree.RepoPruneOptions",
+    #"OSTree.RepoExportArchiveOptions",
+    #"OSTree.RepoCheckoutOptions",
+    #"OSTree.RepoCheckoutAtOptions",
+]
+
+manual = [
+    "Gio.Cancellable",
+    "Gio.File",
+    "Gio.FileInfo",
+    "Gio.FileQueryInfoFlags",
+    "Gio.InputStream",
+    "GLib.Bytes",
+    "GLib.Error",
+    "GLib.KeyFile",
+    "GLib.String",
+    "GLib.Variant",
+]
+
+[[object]]
+name = "OSTree.CollectionRef"
+status = "generate"
+    [[object.function]]
+    pattern = "dupv|equal|freev|hash"
+    ignore = true
+
+[[object]]
+name = "OSTree.MutableTree"
+status = "generate"
+    [[object.function]]
+    pattern = "lookup"
+    ignore = true
+
+[[object]]
+name = "OSTree.Repo"
+status = "generate"
+    [[object.function]]
+    pattern = ".+_async"
+    ignore = true
+
+    [[object.function]]
+    pattern = "mode_from_string"
+    ignore = true
+
+    [[object.function]]
+    pattern = "remote_gpg_import"
+    ignore = true
+
+[[object]]
+name = "OSTree.RepoFile"
+status = "generate"
+    [[object.function]]
+    pattern = "get_xattrs"
+    ignore = true
+
+    [[object.function]]
+    pattern = "tree_find_child"
+    ignore = true
+
+    [[object.function]]
+    pattern = "tree_query_child"
+    ignore = true
+
+[[object]]
+name = "OSTree.*"
+status = "generate"
+    [[object.function]]
+    pattern = "cmp_checksum_bytes|checksum_inplace_to_bytes"
+    ignore = true
+
+    [[object.constant]]
+    pattern = "VERSION|VERSION_S|YEAR_VERSION|RELEASE_VERSION"
+    ignore = true
index d8bdbed231d98e18a3ca4da77be5fa90c2f9d43d..1093a3f1d6463b6d176eecaf82abbd7a9ee0fa5e 100644 (file)
@@ -1,17 +1,17 @@
 extern crate gio;
 extern crate glib;
-extern crate libostree;
+extern crate ostree;
 extern crate tempfile;
 
 use glib::prelude::*;
-use libostree::prelude::*;
+use ostree::prelude::*;
 use std::fs;
 use std::io;
 use std::io::Write;
 
-fn create_repo(repodir: &tempfile::TempDir) -> Result<libostree::Repo, glib::Error> {
-    let repo = libostree::Repo::new_for_path(repodir.path());
-    repo.create(libostree::RepoMode::Archive, None)?;
+fn create_repo(repodir: &tempfile::TempDir) -> Result<ostree::Repo, glib::Error> {
+    let repo = ostree::Repo::new_for_path(repodir.path());
+    repo.create(ostree::RepoMode::Archive, None)?;
     Ok(repo)
 }
 
@@ -23,17 +23,17 @@ fn create_test_file(treedir: &tempfile::TempDir) -> Result<(), io::Error> {
 
 fn create_mtree(
     treedir: &tempfile::TempDir,
-    repo: &libostree::Repo,
-) -> Result<libostree::MutableTree, glib::Error> {
+    repo: &ostree::Repo,
+) -> Result<ostree::MutableTree, glib::Error> {
     let gfile = gio::File::new_for_path(treedir.path());
-    let mtree = libostree::MutableTree::new();
+    let mtree = ostree::MutableTree::new();
     repo.write_directory_to_mtree(&gfile, &mtree, None, None)?;
     Ok(mtree)
 }
 
 fn commit_mtree(
-    repo: &libostree::Repo,
-    mtree: &libostree::MutableTree,
+    repo: &ostree::Repo,
+    mtree: &ostree::MutableTree,
 ) -> Result<String, glib::Error> {
     repo.prepare_transaction(None)?;
     let repo_file = repo.write_mtree(mtree, None)?.downcast().unwrap();
@@ -43,8 +43,8 @@ fn commit_mtree(
     Ok(checksum)
 }
 
-fn open_repo(repodir: &tempfile::TempDir) -> Result<libostree::Repo, glib::Error> {
-    let repo = libostree::Repo::new_for_path(repodir.path());
+fn open_repo(repodir: &tempfile::TempDir) -> Result<ostree::Repo, glib::Error> {
+    let repo = ostree::Repo::new_for_path(repodir.path());
     repo.open(None)?;
     Ok(repo)
 }